# include "LILmatrix.H"

using namespace std ;
using namespace mg::numeric::algebra ;

int main() {

  
  LILmatrix<int> lm1 = {{0,1,0,0},{0,3,0,9},{2,0,0,3},{3,0,0,1}};

  
  cout << lm1 ;

  LILmatrix<int> lm2("input2.dat");    

  cout << "------------------------------------------------------------------------------------" << endl;   
  cout << lm2 ;    
  LILmatrix<double> lm3  = {{1.01, 0 , 0,0}, {0, 4.07, 1.14,0},{0,0,6.08,0},{1.06,0,2.2,9.9} }; 
  LILmatrix<double> lm4  = {{ 1.21, 1.06 , 0,2.15 }, {0, 3.31, 1.03,1.31},{0,1.06,-6.01,1.01},{4.12,1.1,1.06,-8.3}};
  
  cout << "------------------------------------------------------------------------------------" << endl;   
  lm3.print() ;
  cout << "------------------------------------------------------------------------------------" << endl;   
  lm4.print() ;
  cout << "------------------------------------------------------------------------------------" << endl;   
  
  cout << lm3+lm4 ;
  
  vector<double> x = {13.04,1.32,7.12,11.1};
  std::vector<double> y = lm3*x ;
  cout << "------------------------------------------------------------------------------------" << endl;   

  for(auto& x : y)
      cout << x << ' ' ;
  cout << endl;    
  
  LILmatrix<double> lm5("coo_matrix.mtx");
  cout << "------------------------------------------------------------------------------------" << endl;   
  
  cout << lm5 ;
  cout << "------------------------------------------------------------------------------------" << endl;   
   LILmatrix<int> lm6("input17.dat");

  cout << "------------------------------------------------------------------------------------" << endl;   
  cout << lm6 ;
  cout << "------------------------------------------------------------------------------------" << endl;   
   std::vector<int> v1 = {3,4,0,1,6,8,1,19};
     
  std::vector<int> v2 = lm6 *v1 ;
  for(auto& x : v2)
     cout << x << ' ' ;
  cout << endl;   



  return 0;
}









